﻿
using System;
using FastNet.RepositorySystem;
using FastNet.RepositorySystem.Interfaces;
using SampleRepository.Entities;

namespace SampleRepository.Repositories
{
    public interface IContactRepository : IIdentityRepository<IContactData>
    {
        /// <summary>
        /// Retrieve a contact given a shipping address ID
        /// </summary>
        /// <param name="shippingId">Identity of the shipping address associated with the contact</param>
        /// <returns>IContactData that was found or NULL if no contact was found</returns>
        /// <exception cref="InvalidOperationException">Thrown if the Identity provided does not match the type of the underlying provider</exception>
        IContactData RetrieveByShippingAddressId(Identity shippingId);
    }
}
